<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="CreateNewPassword.aspx.cs" Inherits="CreateNewPassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   
    <!-- Content general onclick="submitPasswordValidader()"  -->
    <div class="content_general">
        <div class="form_general mt_10px">
            <div style="border: 1px solid #fff; width: 600px; padding: 20px; margin-left: 190px;
                background: #fff url(images/bg_top.gif) top center repeat-x">
                <div class="red1" style="font-size: 19px; background: url(images/icon_forget.gif) 0 0 no-repeat;
                    padding: 5px 0px 5px 35px;">
                    Set a New Password</div>
                <div class="mt_10px">
                   <asp:Literal ID="ltrMsg" runat="server"></asp:Literal></div>
                <div class="formrow mt_5px">
                    <div class="lb fl" style="padding-top:0px;">
                        Registered Email:
                    </div>
                    <asp:Literal ID="ltrEmail" runat="server"></asp:Literal>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow mt_5px">
                     <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator2" runat="server"
                    ControlToValidate="password" ErrorMessage="<div class='field_error' style='position: absolute; top: 4px; left: 346px;'>
                    Please enter your password</div>"></asp:RequiredFieldValidator>
                <asp:Literal Visible="false" ID="ltrMesM" runat="server" Text="<div class='field_error' style='position: absolute; top: 4px; left: 346px;'>
                    Your password should be 6-20 characters long (A-Z, a-z, 0-9, no spaces).</div>" ></asp:Literal>
                    <div class="lb_largest right" style="float:left; width:auto;">
                        <strong style="margin-right:9px;">Enter New Password:</strong>
                    </div>
                    <input name="" type="password" onkeyup="this.value = FormatNumber1(this.value);"
                        id="password" runat="server" class="textbox_small fl" />
                    <div class="form_general_right form_note">
                        6 to 20 characters. (A-Z, a-z, 0-9, no space)</div>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow mt_5px">
                <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator1" runat="server"
                    ControlToValidate="rePass" ErrorMessage="<div class='field_error' style='position: absolute; top: 4px; left: 346px;'>
                    Please enter repeat New Password</div>"></asp:RequiredFieldValidator>
                     <asp:CompareValidator Display="Dynamic" ControlToValidate="rePass" ControlToCompare="password"
                    ID="cpass" runat="server" ErrorMessage="<div class='field_error' style='position: absolute; top: 4px; left: 346px;'>
                    Passwords are not the same</div>"></asp:CompareValidator>
                    <div class="lb_largest right" style="float:left; width:auto;">
                        <strong>Repeat New Password:</strong>
                    </div>
                    <input name="" type="password" onkeyup="this.value = FormatNumber1(this.value);"
                        id="rePass" runat="server" class="textbox_small fl" />
                    <div class="clr">
                    </div>
                </div>
                <div class="mt_10px" style="padding-left: 0px;">
                    <asp:Button ID="btnSubmit" runat="server" CausesValidation="true" CssClass="sub_mit" Text="Submit" OnClick="btnSubmit_Click" />
                    <div class="clr">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">   
		var passwordID = "password";
			var  passwordHaveLengthTip=  "Your password should be 6-20 characters long (A-Z, a-z, 0-9, no spaces).";
				
	
    </script>

    <script type="text/javascript">
    function submitPasswordValidader(){    
	   var passwordValue=document.getElementById("<%=password.ClientID%>");
	    
	  if(!checkPasswordLength(passwordValue.value))
	  {
	     passwordFocusoutEvent0();
	     	     return false;
	  }
	 
	  	  return true;
	} 
	function checkPasswordLength(pass){
			     
				if(pass.length >= 6 && pass.length <= 20){
								
					return true;
				}else{
				
					alert(passwordHaveLengthTip);	
					
									 
				} 
		//} 
		
		return false;
	}
	
    </script>

</asp:Content>
